package com.sheledon.flyCat.core.aop.intercept;

import com.sheledon.flyCat.common.utils.ReflectionUtils;
import lombok.Data;

import java.lang.reflect.Method;

@Data
public class MethodInvocation {
    private final Object target;
    private final Method method;
    private final Object [] args;

    public MethodInvocation(Object target, Method method, Object[] args) {
        this.target = target;
        this.method = method;
        this.args = args;
    }
    public Object proceed(){
        return ReflectionUtils.executeMethod(method,target,args);
    }
}
